R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

MPA size decision support model for SA case study by Nils Krueck, Jan 2022

Script to plot results from model v1.00 as an interactive figure by Ross Dwyer

case.study.region <- "SA_idealized"
resolution <- 100
dispersal.period <- "Weekly"
age <- "Maturity"
rBRUVcatchment <- 100
#Load the plotting functions
#source("~/Library/CloudStorage/OneDrive-UniversityoftheSunshineCoast/Australia/Flinders/R/Plotly MPA functions.R")
source(paste0(maindir,"R Code/Reporting/Plotly MPA functions.R"))

Calculate MPA size to achieve certain protection levels

Plot mean protection

Plot lifetime fishing mortality and fishing mortality offsets

plotLifMort(F1="0.05",sd=TRUE)
plotLifMort(F1="0.1")
plotLifMort(F1="0.2")
plotLifMort(F1="0.5")

fishing mortality offsets

#foffs.d <- round(foffs,2) # Round to 2 decimal places for easy viewing
plotMortOff(F1="0.05")
plotMortOff(F1="0.1")
plotMortOff(F1="0.2")
plotMortOff(F1="0.5")

Probability of survival

plotProbSurv(F1="0.05")
plotProbSurv(F1="0.1")
plotProbSurv(F1="0.2")
plotProbSurv(F1="0.5")

Plot number of protected individuals

plotNoInd("0.05")
plotNoInd("0.1")
plotNoInd("0.2")
plotNoInd("0.5")

Including Maps

You can also embed plots, for example:

## tmap mode set to interactive viewing

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.